package com.jysz.certificate.persistence.model.system;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.jysz.webcore.ssh.entity.AbstractBaseEntity;


/**
 * 店铺 金融机构 协议
 * @author <a href="mailto:javaengine@outlook.com">Kaca Rich</a>
 *
 */
@Entity
@Table(name = "sys_treaty_")
@org.hibernate.annotations.Entity
public class Treaty  extends AbstractBaseEntity<Long> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/** property column names begin**/
	public static final String COLUMN_SHOP = "shop";
	public static final String COLUMN_BRANCH= "branch";
	public static final String COLUMN_COLLECTION_WAY= "collectionWay";
	public static final String COLUMN_IDENTIFIER= "identifier";
	public static final String COLUMN_STATE= "state";
	public static final String COLUMN_FLOORS= "floors"; 
/** property column names end**/
	private Shop shop;//销售店
	private Financial financial;//金融机构
	private String identifier;//协议编号
	private String  branch;//合作银行 
	private String collectionWay;//管理费收取方式
	private Double floors;//保底数
	private Double unitPrice;//单证释放价
	private String manager;//客户经理
	private Date startDate;//签订时间
	private Date endDate;//结束时间
	private String foreignReserves;//是否有存底
	private String remark;//备注 
	private String conductorPhone;//客户电话
	private String conductorEmile;//客户邮箱
	private Boolean state;//状态
	private Boolean mark;//签订标示 true新签 false 续签
	private Double maximum;//管理费收取最大数
	
	@Column(name = "_maxi_mum",columnDefinition="numeric(8,2)")
	public Double getMaximum() {
		return maximum;
	}
	public void setMaximum(Double maximum) {
		this.maximum = maximum;
	}
	@Column(name = "_mark",columnDefinition="tinyint(1)")
	public Boolean getMark() {
		return mark;
	}
	public void setMark(Boolean mark) {
		this.mark = mark;
	}
	@ManyToOne(fetch = FetchType.LAZY)  
	@JoinColumn(name = "_financial_id",columnDefinition="bigint(20)") 
	public Financial getFinancial() {
		return financial;
	}
	public void setFinancial(Financial financial) {
		this.financial = financial;
	}
	@Column(name = "_state",columnDefinition="tinyint(1)")
	public Boolean getState() {
		return state;
	}
	public void setState(Boolean state) {
		this.state = state;
	}
	@Column(name = "_conductorPhone",columnDefinition="varchar(255)")
	public String getConductorPhone() {
		return conductorPhone;
	}
	public void setConductorPhone(String conductorPhone) {
		this.conductorPhone = conductorPhone;
	}
	@Column(name = "_conductorEmile",columnDefinition="varchar(50)")
	public String getConductorEmile() {
		return conductorEmile;
	}
	public void setConductorEmile(String conductorEmile) {
		this.conductorEmile = conductorEmile;
	}
	@ManyToOne(fetch = FetchType.LAZY)  
	@JoinColumn(name = "_shop_id",columnDefinition="bigint(20)") 
	public Shop getShop() {
		return shop;
	}
	public void setShop(Shop shop) {
		this.shop = shop;
	}
	@Column(name = "_identifier", nullable = false, unique = true,columnDefinition="varchar(250)")
	public String getIdentifier() {
		return identifier;
	}
	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}
	@Column(name = "_branch",columnDefinition="varchar(255)")
	public String getBranch() {
		return branch;
	}
	public void setBranch(String branch) {
		this.branch = branch;
	} 
	@Column(name = "_collectionWay",columnDefinition="varchar(2)")
	public String getCollectionWay() {
		return collectionWay;
	}
	public void setCollectionWay(String collectionWay) {
		this.collectionWay = collectionWay;
	}
	@Column(name = "_floors",columnDefinition="numeric(8,2)")
	public Double getFloors() {
		return floors;
	}
	public void setFloors(Double floors) {
		this.floors = floors;
	}
	@Column(name = "_unitPrice",columnDefinition="numeric(8,2)")
	public Double getUnitPrice() {
		return unitPrice;
	}
	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}
	@Column(name = "_manager",columnDefinition="varchar(55)")
	public String getManager() {
		return manager;
	}
	public void setManager(String manager) {
		this.manager = manager;
	}
	@Column(name = "_startDate")
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	@Column(name = "_endDate")
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	@Column(name = "_foreignReserves",columnDefinition="varchar(2)")
	public String getForeignReserves() {
		return foreignReserves;
	}
	public void setForeignReserves(String foreignReserves) {
		this.foreignReserves = foreignReserves;
	}
	@Column(name = "_remark",columnDefinition="varchar(250)")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
}
